/**
 * @Description:
 * @Author HP
 * @create 2021/8/19 17:25
 */
import { createRouter, createWebHistory } from 'vue-router'
import routes from './routes'
import { routerGuard } from './permission'

console.log('routes', routes)

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export { router }

export default {
  install: app => {
    routerGuard.call(router)
    app.use(router)
  }
}
